const pairElement = str => {
  const pairs = {
    A: 'T',
    T: 'A',
    G: 'C',
    C: 'G'
  };
  const arr2D = [];
  for (const char of str) {
    arr2D.push([char, pairs[char]]);
  }
  return arr2D;
}

console.log(pairElement("ATCGA"));